{extend name="public/menu3" /}
{block name='title'}-{$cur.name}{/block}

{block name='content'}
<div class="title">{$news.title ?: ''}</div>
<div class="sub_title">发布时间： {$news.create_at|format_datetime='Y-m-d'} | 来源： {$news.source ?: ''} | 作者： {$news.author ?: ''}</div>
<div class="editor_contents">
    <!-- start -->
    {$news.content|raw|default=''}
    <!-- end -->
</div>
<ul id="article_navigation">
    {if empty(newspre($news.id,$news.pid))}
    <li>上一篇：没有了</li>
    {else}
    {php}$newsid = newspre($news['id'],$news['pid'])['id'];{/php}
    <li><a href='{:url("/newsdetails/$newsid")}'>上一篇：{:newspre($news.id,$news.pid)['title']}</a></li>
    {/if}
    {if empty(newsnext($news.id,$news.pid))}
    <li>下一篇：没有了</li>
    {else}
    {php}$newsid = newsnext($news['id'],$news['pid'])['id'];{/php}
    <li><a href='{:url("/newsdetails/$newsid")}'>下一篇：{:newsnext($news.id,$news.pid)['title']}</a></li>
    {/if}
</ul>
{/block}

{block name='script'}
<style>
    #content .title {
        margin: 65px auto 0;
        width: 1200px;
        text-align: center;
        font-size: 32px;
    }

    #content .sub_title {
        margin: 20px auto;
        width: 1200px;
        text-align: center;
        font-size: 14px;
        color: #959595;
    }

    #content .editor_contents {
        margin: 65px auto;
        width: 1200px;
        line-height: 1.7;
        font-size: 14px;
        color: #666;
    }
    #content .editor_contents p{
        min-height: 14px;
    }
    #content .editor_contents img {
        max-width: 100%;
    }
    #article_navigation{
        margin: 65px auto;
        width: 1200px;
        font-size: 14px;
        color: #999;
        display: flex;
        justify-content: flex-end;
    }
    #article_navigation a{
        font-size: 14px;
        color: #999;
    }
    #article_navigation a:hover{
        text-decoration: underline;
    }
    #article_navigation li{
        margin-left: 20px;
    }
</style>
{/block}